﻿@page "/SysConfigGroup/Details/{id}"
@using SelfService.ViewModel.SysConfigGroupVMs;
@inherits BasePage

<ValidateForm @ref="VForm" Model="@_model" >
    <Row ItemsPerRow="ItemsPerRow.Two" RowType="RowType.Normal">
        <Display @bind-Value="@_model.Entity.Key"   ShowLabel="true"/>
        <Display @bind-Value="@_model.Entity.Name"   ShowLabel="true"/>
        <Display @bind-Value="@_model.Entity.Description"   ShowLabel="true"/>
    </Row>
    <div class="modal-footer table-modal-footer">
        <Button Color="Color.Primary" Icon="fa fa-save" Text="@WtmBlazor.Localizer["Sys.Close"]" OnClick="OnClose"></Button>
    </div>
</ValidateForm>

@code {

    private SysConfigGroupVm _model = null;
    private ValidateForm VForm { get; set; }
    [Parameter]
    public string Id { get; set; }


    protected override async Task OnInitializedAsync()
    {

        var rv = await WtmBlazor.Api.CallAPI<SysConfigGroupVm>($"/api/SysConfigGroup/{Id}");
        _model = rv.Data;
    }

    public void OnClose()
    {
        CloseDialog();
    }

}
